<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const p1 = new Promise(resolve => setTimeout(() => {
            resolve(100)
        }, 3000));

        const obj = {
            // fn: async function () {
            //     console.log(await p1);
            // }
            // fn: async () => {
            //     console.log(await p1);
            // },
            async fn() {
                console.log(await p1);
            }
        }

        // const fn = async () => {
        //     console.log(await p1);
        // }

        // async function fn() {
        //     console.log(await p1);
        // }

        // const fn = async function () {
        //     console.log(await p1);
        // }

    </script>
</body>

</html>